from django.db import models

# Create your models here.


# Create your models here.


class Area(models.Model):
    """省市区"""
    name = models.CharField(max_length=20, verbose_name='名称')
    parent = models.ForeignKey('self', related_name='subs', null=True, on_delete=models.SET_NULL, verbose_name='上级行政地区')

    class Meta:
        db_table = 'tb_areas'

    def __str__(self):
        return self.name